module DisplayController(
    input clk,
    input rst_n,
    input [3:0] current_num,
    input [11:0] time_used,
    input [7:0] time_penalty,
    output [7:0] segs,
    output [3:0] an,
    output reg [3:0] bcd_penalty_high,
    output reg [3:0] bcd_penalty_low
);

    wire [3:0] h, t, u;
    reg [15:0] display_data;

    BinaryToBCD bcd12(.binary(time_used), .h(h), .t(t), .u(u));
    BinaryToBCD_8bit bcd8(.binary(time_penalty), .high(bcd_penalty_high), .low(bcd_penalty_low));

    always @(*) begin
        display_data = {current_num, h, t, u};
    end

    x7seg segdrv(
        .x(display_data),
        .clk(clk),
        .clr_n(rst_n),
        .a_to_g(segs),
        .an(an)
    );
endmodule
